package org.ejc.persist.model;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;


/** @author Hibernate CodeGenerator */
public class TaskHasConventionExecutive implements Serializable {

    /** identifier field */
    private org.ejc.persist.model.TaskHasConventionExecutivePK comp_id;

    /** nullable persistent field */
    private org.ejc.persist.model.ConventionExecutive conventionExecutive;

    /** nullable persistent field */
    private org.ejc.persist.model.Task task;

    /** full constructor */
    public TaskHasConventionExecutive(org.ejc.persist.model.TaskHasConventionExecutivePK comp_id, org.ejc.persist.model.ConventionExecutive conventionExecutive, org.ejc.persist.model.Task task) {
        this.comp_id = comp_id;
        this.conventionExecutive = conventionExecutive;
        this.task = task;
    }

    /** default constructor */
    public TaskHasConventionExecutive() {
    }

    /** minimal constructor */
    public TaskHasConventionExecutive(org.ejc.persist.model.TaskHasConventionExecutivePK comp_id) {
        this.comp_id = comp_id;
    }

    public org.ejc.persist.model.TaskHasConventionExecutivePK getComp_id() {
        return this.comp_id;
    }

    public void setComp_id(org.ejc.persist.model.TaskHasConventionExecutivePK comp_id) {
        this.comp_id = comp_id;
    }

    public org.ejc.persist.model.ConventionExecutive getConventionExecutive() {
        return this.conventionExecutive;
    }

    public void setConventionExecutive(org.ejc.persist.model.ConventionExecutive conventionExecutive) {
        this.conventionExecutive = conventionExecutive;
    }

    public org.ejc.persist.model.Task getTask() {
        return this.task;
    }

    public void setTask(org.ejc.persist.model.Task task) {
        this.task = task;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("comp_id", getComp_id())
            .toString();
    }

    public boolean equals(Object other) {
        if ( (this == other ) ) return true;
        if ( !(other instanceof TaskHasConventionExecutive) ) return false;
        TaskHasConventionExecutive castOther = (TaskHasConventionExecutive) other;
        return new EqualsBuilder()
            .append(this.getComp_id(), castOther.getComp_id())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getComp_id())
            .toHashCode();
    }

}
